-- GENERATED SPELL FOR [Overseer Deathgaze] --


function spell0_27122(pUnit, Event) --@Conversion Beam,n/a--
pUnit:FullCastSpellOnTarget(50659,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27122', 10000, 1)
end

function spell1_27122(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(12739,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27122', 3000, 1)
end

function Sorts_27122(pUnit, Event)
local choix_sorts_27122 = math.random(0, 1)
if choix_sorts_27122 == 0 then
pUnit:RegisterEvent('spell0_27122', 1, 1)
end
if choix_sorts_27122 == 1 then
pUnit:RegisterEvent('spell1_27122', 1, 1)
end
end

function mob27122_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27122', math.random(1500, 3000), 1)
end

function mob27122_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27122_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27122_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27122, 1, 'mob27122_Action')
RegisterUnitEvent(27122, 2, 'mob27122_Leave')
RegisterUnitEvent(27122, 3, 'mob27122_Kill')
RegisterUnitEvent(27122, 4, 'mob27122_Die')
